﻿<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<meta http-equiv="X-UA-Compatible" content="IE=11"/>
<title></title>
<!--框架必需start-->
<link href="../../libs/css/import_main.css" rel="stylesheet" type="text/css"/>
<link href="../../libs/skins/blue/style.css" rel="stylesheet" type="text/css" id="theme" themeColor="blue" positionTarget="positionContent"/>
<link href="skin/style.css" rel="stylesheet" type="text/css" id="skin" skinPath="system/style16_accordion_blue/skin/"/>
<script type="text/javascript" src="../../libs/js/jquery.js"></script>
<script type="text/javascript" src="../../libs/js/language/cn.js"></script>
<script type="text/javascript" src="../../libs/js/main.js"></script>
<!--框架必需end-->

<!--弹窗组件start-->
<script type="text/javascript" src="../../libs/js/popup/drag.js"></script>
<script type="text/javascript" src="../../libs/js/popup/dialog.js"></script>
<!--弹窗组件end-->

<!--引入提示组件start-->
<script type="text/javascript" src="../../libs/js/popup/toast.js"></script>
<script type="text/javascript" src="../../libs/js/popup/notice.js"></script>
<!--引入提示组件end-->

<!--左侧导航start-->
<script type="text/javascript" src="../main_html/js/menuNav.js"></script>
<!--左侧导航end-->

<!--信件箱start-->
<link rel="stylesheet" type="text/css" href="../../libs/skins/blue/msgbox.css" />
<script type="text/javascript" src="../../libs/js/popup/msgbox.js"></script>
<!--信件箱end-->

	<!--self开始-->
	<link rel="stylesheet" href="../../assets/css/m_style.css" class="m_style">
	<script type="text/javascript" src="../../assets/js/m_main.js"></script>
	<!--self结束-->

<style>
	body{
		width: 100%!important;
		margin: 0;
		padding:0;
	}
	/*修改小铃铛样式*/
	.right_tip{
		width: 60px;
		height: 50px;
		margin-left: 0;
		cursor: pointer;
	}
	.tip_icon{
		margin-top: 12px;
	}
	.tip_balloons{
		margin-top: 5px;
	}
	.tip_toggle_content{
		top: 50px;
		right: -16px;
	}
	.tip_allcontent_win,
	.tip_allcontent{
		top: 0px;
	}
	.tip_icon{
		background: url(skin/page_head_ico.png) 0 -60px no-repeat;
	}
	.tip_icon_win:hover .tip_icon{
		background: url(skin/page_head_ico.png) 0 -60px no-repeat;
	}
	#positionContent{
		float: left;
		width: 250px;
		height: 50px;
		line-height: 50px;
		/*color: #fff;*/
		margin-left: 20px;
	}
</style>
</head>
<body>
<div id="mainFrame">
<!--头部与导航start-->
<div id="hbox"></div>
<!--头部与导航end-->
<div id="mainFrame">
			<table width="100%" cellpadding="0" cellspacing="0" class="table_border0">
				<tr>
					<!--左侧区域start-->
					<td id="hideCon" class="ver01 ali01">
						<div id="lbox">
							<div id="lbox_topcenter">
								<div class="LeftNav_title">
									<b></b>
									<div class="clear"></div>
								</div>
							</div>
							<div id="lbox_middlecenter">
								<div id="lbox_middleleft">
									<div id="lbox_middleright">
										<div id="bs_left">


											<div class="LeftNav_win">

												<div class="stair_win" id="stair_win">
													<img src="" alt="" />
												</div>
											</div>
										</div>
										<!--更改左侧栏的宽度需要修改id="bs_left"的样式-->
									</div>
								</div>
							</div>
							<div id="lbox_bottomcenter">
								<div id="lbox_bottomleft">
									<div id="lbox_bottomright">
										<div class="lbox_foot"></div>
									</div>
								</div>
							</div>
						</div>
					</td>
					<!--左侧区域end-->

					<!--右侧区域start-->
					<td class="ali01 ver01" width="100%">
						<div id="rbox">
							<div id="rbox_topcenter">
								<div>
									<div class="m_page">
										<a href="main.html" class="m_a_focus">SCB/SPD</a>
										<a href="mainLightning.html">雷电波形图</a>
										<a href="groundRecording.html">接地电阻记录</a>
										<a href="weeklySystemOperation.html">系统运行周报</a>
										<a href="set.html">设置</a>
									</div>
									<div class="m_search_box">
										<img src="../../assets/images/search_close.png" alt="" class="m_search_close">
										<input type="text" class="m_search_in" placeholder="请输入搜索信息备份" value="">
										<img src="../../assets/images/m_h_search.png" alt="" class="m_search_s">
										<div class="m_search_list">
											<p class="m_search_l_p">最近搜索</p>
											<ul class="m_search_l_ul">
												<li>SPD基本参数表</li>
												<li>SPD基本参数表</li>
												<li>SPD基本参数表</li>
												<li>SPD基本参数表</li>
											</ul>
										</div>
									</div>
									<!--<div id="positionContent">首页</div>-->
									<ul>
										<li><span class="icon_exit">
											<img src="../../assets/images/home.png" alt="">
											Jackson</span></li>
										<div class="clear"></div>
									</ul>
									<div class="clear"></div>
								</div>
							</div>
							<div id="rbox_middlecenter">
								<div id="rbox_middleleft">
									<div id="rbox_middleright">
										<div id="bs_right">
											<IFRAME style="box-sizing: border-box; background: white;" height="100%" width="100%" frameBorder=0 id=frmright name=frmright src="../../assets/html/M103.html" allowTransparency="true"></IFRAME>
										</div>
									</div>
								</div>
							</div>
							<div id="rbox_bottomcenter">
								<div id="rbox_bottomleft">
									<div id="rbox_bottomright">

									</div>
								</div>
							</div>
						</div>
					</td>
					<!--右侧区域end-->
				</tr>
			</table>

			<!--尾部区域start-->
			<!--<div id="fbox">
				<div id="bs_footcenter">
					<div id="bs_footleft">
						<div id="bs_footright">
							版权所有：http://www.quickui.net
						</div>
					</div>
				</div>
			</div>-->
		</div>

<!--尾部区域start-->
<!--<div id="fbox">
	<div id="bs_footcenter">
	<div id="bs_footleft">
	<div id="bs_footright">
		版权所有：http://www.quickui.net
	</div>
	</div>
	</div>
</div>-->
</div>
<!--尾部区域end-->

<!--浏览器resize事件修正start-->
<div id="resizeFix"></div>
<!--浏览器resize事件修正end-->

<!--窗口任务栏区域start-->
<div id="dialogTask" class="dialogTaskBg" style="display:none;"></div>
<!--窗口任务栏区域end-->

<!--载进度条start-->
<div class="progressBg" id="progress" style="display:none;"><div class="progressBar"></div></div>
<!--载进度条end-->
<!---->
<script type="text/javascript">
	var ctr="http://www.chinalightning.com.cn/api/search_equipment/";

    //无名称
    var nothing={ "id":"201", "parentId":"2", "name":"无", "target":"frmright","icon": "./skin/nav_icon_bg.png","backgroundPosition":"0px 28px"};
	var menuData = [];

var setting = {
	data: {
		simpleData: {
			idKey: "id",
			pIdKey: "parentId",
			enable: true
		},
		key: {
			children: "children"
		}
	}

};




	$.get(ctr, function (res) {

		if (res.message == 200) {
			var fl_list = res.fl_equipment_list;
			$.each(fl_list,function ( index1,value1) {
				var floorNum=index1+1;
				var parentID="p"+floorNum;
				var floor=value1[0].floor;
				var parent = {
					"id": parentID,
					"parentId": "0",
					"name":floor,
					"isParent": "true",
					"img":"./skin/topIcons/icon01.png",
					"backgroundPosition": "3px 0px"
				};
				menuData.push(parent);
				if (value1[0].areas.length==0){
					var nothing = {
						"id": "201",
						"parentId": parentID,
						"name": "无",
						"target": "frmright",
						"icon": "./skin/nav_icon_bg.png",
						"backgroundPosition": "0px 28px"
					};
					menuData.push(nothing);
					return
				}
				$.each(value1[0].areas,function (index2,value2) {

					var areaNum=index2+1;
					var areaID="a"+areaNum+floorNum;
					var areaName=value2.name;
					var area = {
						"id": areaID,
						"parentId": parentID,
						"name":areaName,
						"target": "frmright",
						"icon": "./skin/nav_icon_bg.png",
						"backgroundPosition": "0px 20px"
					}
					menuData.push(area);
					 if(value2.equipments.length==0){
						 var nothing = {
							 "id": "ff201",
							 "parentId": areaID,
							 "name": "无",
							 "target": "frmright",
							 "icon": "./skin/nav_icon_bg.png",
							 "backgroundPosition": "0px 28px"
						 };
						 menuData.push(nothing);
						 return;

					 }
					$.each(value2.equipments,function (index3,value3) {
						var eq=value3["所选设备"];
						var equipment = {
							"id": "e"+value3.id,
							"parentId": areaID,
							"name": eq,
							"url": "../../assets/html/M103.html?params="+floor+","+eq+","+areaName,
							"target": "frmright",
							"icon": "./skin/nav_icon_bg.png",
							"backgroundPosition": "0px 20px"
						}

						menuData.push(equipment);
					});



				});

			});

			initMenuNav(menuData,setting);

		}
	})

</script>
</body>
</html>
